<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>

	<body>
	</body>

</html>
<script>
	function Prime(num) {
		if(num > 1 && typeof num === "number") {
			if(num === 2) {
				return true
			} else if(num % 2 === 0) {
				return false
			}
		} else {
			return false
		}
		var index = Math.sqrt(num)
		for(var i = 3; i < index.length; i += 2) {
			if(num % i === 0) {
				return false
			}
		}
		return true
	}

	console.log(Prime(4))
</script>